﻿using System;
using JetBrains.Annotations;
using Volo.Abp;

namespace Xms.Abp.BackgroundJob;

public class BackgroundScheduleNameAttribute : Attribute, IBackgroundScheduleNameProvider
{
    public string DisplayName { get; }
    public string Name { get; }

    public BackgroundScheduleNameAttribute([NotNull] string displayName, string name = null)
    {
        DisplayName = Check.NotNullOrWhiteSpace(displayName, nameof(displayName));
        Name = name;
    }
}
